Component({
  properties: {},
  data: {
    isExpanded: false,
  },
  methods: {
    toggleMenu: function () {
      this.setData({
        isExpanded: !this.data.isExpanded,
      })
    },
    handleSubButton: function (e) {
      this.triggerEvent('subButtonTap', {
        index: e.currentTarget.dataset.index,
      })
      this.setData({ isExpanded: false })
    },
  },
})
